<template>
  <div class="dashboard-container">
    <el-row :gutter="20">
      <el-col :span="8">
        <el-card shadow="hover" class="mgb20" style="height: 500px">
          <div class="user-info">
            <div class="user-info-cont">
              <div class="user-info-name" style="margin-bottom: 6px;color: #aa55ff;">{{name}}</div>
              <div>超级管理员( as作者 )</div>
            </div>
          </div>
          <dev style="font-size: 16px;color: cornflowerblue;margin-right: 15px;">
            绑定HWID: <el-tag type="success" effect="plain" style="margin-left: 10px;">
               {{ hwid }}
            </el-tag>
          </dev>
          <el-button type="danger" plain style="width: 100px;font-size: 10px;left: 5px;margin-bottom: 25px;">重置HWID
          </el-button>
          <br>
          <dev style="font-size: 16px;color: brown">
            用户套餐:
            <el-tag type="warning" effect="plain" style="margin-left: 20px;">
               {{ usersetMeal }}
            </el-tag>
          </dev>
          <br>
          <el-button type="primary" plain style="margin-left: 0px;margin-top: 20px;">下载加载器</el-button>
          <el-button type="info" plain>重置加载器</el-button>
        </el-card>
      </el-col>
      <el-col :span="16">
        <el-row :gutter="20" class="mgb20">
          <el-col :span="8">
            <el-card shadow="hover" :body-style="{padding: '0px'}">
              <div class="grid-content grid-con-1">
                <i class="el-icon-user grid-con-icon"></i>
                <div class="grid-cont-right">
                  <div class="grid-num">800</div>
                  <div style="padding-top: 10px;font-size: 17px;">云载人数</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="hover" :body-style="{padding: '0px'}">
              <div class="grid-content grid-con-2">
                <i class="el-icon-s-shop grid-con-icon"></i>
                <div class="grid-cont-right">
                  <div class="grid-num">1777</div>
                  <div style="padding-top: 10px;font-size: 17px;">云市场Lua数量</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="hover" :body-style="{padding: '0px'}">
              <div class="grid-content grid-con-3">
                <i class="el-icon-ice-cream-round grid-con-icon"></i>
                <div class="grid-cont-right">
                  <div class="grid-num">9999</div>
                  <div style="padding-top: 10px;font-size: 17px;">今日系统加载</div>
                </div>
              </div>
            </el-card>
          </el-col>
        </el-row>
        <el-card shadow="hover" style="height:403px;">
          <div slot="header" class="clearfix">
            <span>公告</span>
          </div>
          <el-table :show-header="false" :data="todoList" style="width:100%;">
            <el-table-column width="40">
              <template slot-scope="scope">
                <el-checkbox v-model="scope.row.status"></el-checkbox>
              </template>
            </el-table-column>
            <el-table-column>
              <template slot-scope="scope">
                <div class="todo-item" :class="{'todo-item-del': scope.row.status}">{{scope.row.title}}
                </div>
              </template>
            </el-table-column>
            <el-table-column width="60">
              <template>
                <i class="el-icon-edit"></i>
                <i class="el-icon-delete"></i>
              </template>
            </el-table-column>
          </el-table>
        </el-card>
      </el-col>
    </el-row>

    <div class="tips">
      <span style="margin-right:20px;margin-top: 10px;">Developed by XiaoZhengRS | © AegisCloud Lua inc.</span>
    </div>
  </div>
</template>

<script>
  import {
    mapGetters
  } from 'vuex'

  export default {
    name: 'Dashboard',
    data() {
      return {
        name: "XiaoZhengRS",
        hwid: "7aee46843189894f7c38b04a7d3d59d8",
        usersetMeal: "定制套餐",
        todoList: [{
          title: '六花没M 还喜欢放鸽子',
          content: "10",
          publishTime: "2022年6月9日"
        },
        {
          title: '六花没D 还喜欢放鸽子',
          content: "10",
          publishTime: "2022年6月9日"
        }],
        Timer: {
          SystemInfo: null
        },
      }
    },
  }
</script>

<style lang="scss" scoped>
  .tips {
    font-size: 16px;
    color: #aa55ff;
    margin-bottom: 18px;
    span {
      &:first-of-type {
        margin-right: 16px;
      }
    }
  }
  .dashboard {
    &-container {
      margin: 30px;
    }

    &-text {
      font-size: 30px;
      line-height: 46px;
    }
  }

  .el-row {
    margin-bottom: 20px;
  }

  .grid-content {
    display: flex;
    align-items: center;
    height: 100px;
  }

  .grid-cont-right {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #999;
  }

  .grid-num {
    font-size: 30px;
    font-weight: bold;
  }

  .grid-con-icon {
    font-size: 50px;
    width: 100px;
    height: 100px;
    text-align: center;
    line-height: 100px;
    color: #fff;
  }

  .grid-con-1 .grid-con-icon {
    background: rgb(45, 140, 240);
  }

  .grid-con-1 .grid-num {
    color: rgb(45, 140, 240);
  }

  .grid-con-2 .grid-con-icon {
    background: rgb(100, 213, 114);
  }

  .grid-con-2 .grid-num {
    color: rgb(45, 140, 240);
  }

  .grid-con-3 .grid-con-icon {
    background: rgb(242, 94, 67);
  }

  .grid-con-3 .grid-num {
    color: rgb(242, 94, 67);
  }

  .user-info {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
  }

  .user-avator {
    width: 120px;
    height: 120px;
    border-radius: 50%;
  }

  .user-info-cont {
    padding-left: 50px;
    flex: 1;
    font-size: 14px;
    color: #999;
  }

  .user-info-cont div:first-child {
    font-size: 30px;
    color: #222;
  }

  .user-info-list {
    font-size: 14px;
    color: #999;
    line-height: 25px;
  }

  .user-info-list span {
    margin-left: 70px;
  }

  .mgb20 {
    margin-bottom: 20px;
  }

  .todo-item {
    font-size: 14px;
  }

  .todo-item-del {
    text-decoration: line-through;
    color: #999;
  }

  .schart {
    width: 100%;
    height: 300px;
  }
</style>
